package br.com.klis.batendoumabola.client.event;

import br.com.klis.batendoumabola.shared.Pelada;

import com.google.gwt.event.shared.GwtEvent;

public class PeladaUpdatedEvent extends GwtEvent<PeladaUpdatedEventHandler>{
  public static Type<PeladaUpdatedEventHandler> TYPE = new Type<PeladaUpdatedEventHandler>();
  private final Pelada updatedPelada;
  
  public PeladaUpdatedEvent(Pelada updatedPelada) {
    this.updatedPelada = updatedPelada;
  }
  
  public Pelada getUpdatedPelada() { return updatedPelada; }
  

  @Override
  public Type<PeladaUpdatedEventHandler> getAssociatedType() {
    return TYPE;
  }

  @Override
  protected void dispatch(PeladaUpdatedEventHandler handler) {
    handler.onPeladaUpdated(this);
  }
}
